package cn.wolfcode.orderServer.feign.fallback;

import cn.wolfcode.orderServer.feign.ProductFeignApi;
import cn.wolfcode.productServer.domain.Product;
import org.springframework.stereotype.Component;

/**
 * @ClassName ProductFeignFallBack
 * @Author VCR
 * @Date 2021/12/23 19:20
 * @Version 1.0
 */
@Component
public class ProductFeignFallBack implements ProductFeignApi {
    // Feign整合Sentinel
    @Override
    public Product get(Long id) {
        // 添加兜底数据
        Product product = new Product();
        product.setPname("默认商品");
        product.setPid(1L);
        product.setPprice(999.00);
        return product;
    }
}
